package com.xyoto.takeawayUser.controller;

import com.xyoto.takeawayUser.aspect.annotation.RequiresLogin;
import com.xyoto.takeawayUser.service.OrderService;
import com.xyoto.takeawayUser.utils.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/order")
@Api(tags = "订单模块")
public class OrderController {

    @Autowired
    private OrderService orderService;

    @GetMapping("/getRecently")
    @ApiOperation("获取最近常买列表")
    @RequiresLogin
    public Result getRecently(){
        return orderService.getRecently();
    }

}
